package cn.zwx.multi_datasource_example.service.db1.service;

import cn.zwx.multi_datasource_example.annotation.DataSource;
import cn.zwx.multi_datasource_example.mapper.db1.DataSynMapper;
import cn.zwx.multi_datasource_example.model.po.DataSyn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @description:
 * @projectName:multi_datasource_example
 * @see:cn.zwx.multi_datasource_example.service.db1.service
 * @author:zhangwenxue
 * @createTime:2021/8/16 19:04
 * @version:1.0
 */
@Service
@DataSource(name = "db1")
public class DataSynServiceImpl implements DataSynService {

    @Autowired
    private DataSynMapper dataSynMapper;


    @Override
    public void insert(DataSyn dataSyn) {

        dataSynMapper.insertSelective(dataSyn);
    }
}
